package org.conan.groupapp.common.ibatis.dialect;

/**
 * MySQL的Dialect实现
 * 
 * @author pengjun
 */
public class MySQLDialect implements Dialect {

	public boolean supportsLimitOffset() {
		return true;
	}

	public boolean supportsLimit() {
		return true;
	}

	public String getLimitString(String sql, int offset, int limit) {
		if (offset > 0) {
			return sql + " limit " + offset + "," + limit;
		} else {
			return sql + " limit " + limit;
		}
	}

}
